const { Controller } = require('egg');
const fs = require('fs');
const path = require('path');

class HomeController extends Controller {
  async render() {
    const { ctx } = this;
    const html = fs.readFileSync(path.resolve(__dirname, '../public/index.html')).toString();
    ctx.body = html;
  }
}

module.exports = HomeController;
